Skip to content

support custom log lines processing via script #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from

Conversation

jakub-bochenski
Copy link

@jakub-bochenski jakub-bochenski commented Mar 20, 2018

Second attempt at #40

This change requires jenkinsci/script-security-plugin#169 to work.

Please see help-script.html for possible use cases.

I needed to update parent pom version because of script-security-plugin which led to
the need to suppress additional warnings. Still waiting on
jenkinsci/script-security-plugin#169 to be accepted so not ready to merge. I have an
alternative approach if the pull is not accepted, unfortunately not that performant.

But I will appreciate feedback for this PR in the meanwhile so I can fix issues.

@jakub-bochenski jakub-bochenski changed the title Akostadinov master support custom log lines processing via script Mar 20, 2018
@jakub-bochenski jakub-bochenski self-assigned this Mar 20, 2018
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was really just requested for review since I noted that this is inherently incompatible with #18. I do not really care much, since #18 was merely a proof of concept for a more general change which we would likely implement in a fresh plugin anyway, so do not let me block other features.

My general feeling is that this kind of log line processing need not be done by Jenkins anyway—most log output comes from external processes (like sh in Pipeline) and so you could just use Unix pipes or whatever to tidy up output however you like, without needing any special Jenkins features. Not to mention that external pipes can be trivially tested from a developer’s shell without needing to experiment with a live Jenkins build. Maybe there is some more subtle use case I am not grasping.

@jakub-bochenski
Copy link
Author

jakub-bochenski commented Apr 3, 2018

@jglick I would certainly be interested in both having script processing and using the slaves to push the logs instead of master (mostly because our main Jenkins master is a 20GB ram hog).
Would it be possible to do script processing on slaves?

Not to anwser for @akostadinov, but for me the biggest use case is actually not about processing the message itself, but about the metadata sent along with it.
The json payload is bloated with a lot of attributes e.g. "rootFullProjectName", "fullDisplayName", "rootProjectName", "fullProjectName" and "projectName" because people keep adding more to fit their needs. I hope we could remove most (if not all of it) by default and just let people add metadata they want via script.

Other people also seem to be interested in this metadata processing, e.g. https://issues.jenkins-ci.org/browse/JENKINS-50455

@jakub-bochenski
Copy link
Author

@akostadinov so how are things going? Do you think you will manage to look into this PR any time soon?

@akostadinov
Copy link

I hope so, but since we got a new release under testing, There are so far constantly other "urgent" tasks.

@akostadinov
Copy link

Finally got back to this. Seems like a lot of new conflicts. Tough luck ¯_(ツ)_/¯

@akostadinov
Copy link

This one should be closed as I can't update it. I opened #71 to track it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants